package com.qt.eurekaClientSearch.rpc;

import com.qt.eurekaClientSearch.entity.Product;
import com.qt.eurekaClientSearch.rpc.impl.UserRpcClientImpl;
import com.qt.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Despription: 远程调用user模块API接口
 *
 * @Autor: xusl
 * @Date: 2019/6/19 16:04
 * @Version: 1.0
 **/
@FeignClient(value = "eureka-client-user", fallback = UserRpcClientImpl.class)
@Repository
public interface UserRpcClient {

    @GetMapping(value = "/product/query_page")
    Result queryByPage(@RequestParam(value = "pageSize", required = false, defaultValue = "5") Integer pageSize,
                       @RequestParam(value = "pn", required = false, defaultValue = "1") Integer pn,
                       @RequestBody Product product);
}
